﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using Domain.Entity;

namespace Domain.Concrete
{
    public class EFDbContext : DbContext
    {

        public static EFDbContext Instance
        {
            get
            {
                return new EFDbContext();
            }
        }

        public DbSet<Feedback> Feedbacks { get; set; }
        public DbSet<Review> Reviews { get; set; }
        public DbSet<Company> Companies { get; set; }
        public DbSet<Platform> Platforms { get; set; }
        public DbSet<NewsArticle> NewsArticles { get; set; }
        public DbSet<Game> Games { get; set; }
        public DbSet<Account> Accounts { get; set; }
        public DbSet<Picture> Pictures { get; set; }
        public DbSet<Video> Videos { get; set; }
        public DbSet<MetaScore> MetaScores { get; set; }
        public DbSet<SystemRequirements> SystemRequirementsDONOTUSE { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Game>().HasOptional<SystemRequirements>( g => g.SystemRequirements).WithOptionalDependent();
        }
    }
}
